<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>- 马自达3星骋 2012款 马自达3 星骋 两厢 2.0L 自动 豪华运动型 -
		锐车官网，二手车源码，二手车app,二手车手机wap版,二手车代码，二手车程序，二手车建站，汽车网站源码，汽车网站系统，汽车门户网站系统，php+mysql-锐车官方网站</title>
	<meta content="二手车" name="keywords" />
	<meta content="二手车" name="description" />
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="iconfont/iconfont.css">
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<!--[if lt IE 9]>
    <![endif]-->
	<script type="text/javascript" src="script/jquery.js"></script>
	<script type="text/javascript" src="script/bootstrap.min.js"></script>
	<script type="text/javascript" src="script/layer.mobile/layer.js"></script>
	<script type="text/javascript" src="script/TouchSlide.1.1.js"></script>

	<script type="text/javascript" src="script/layer.js"></script>
	<script type="text/javascript" src="script/jquery-3.3.1.min.js"></script>
	<link rel="stylesheet" type="text/css" href="css/feedback-page.css" />
	<script type="text/javascript" src="script/jquery.lazyload.js"></script>
	<script src="js/mui.js"></script>

	<script src="js/mui.picker.min.js"></script>
	<script src="js/mui.picker.js"></script>
	<script src='js/feedback.js'></script>
	<script src="js/app.js"></script>

	<link rel="stylesheet" href="css/swiper.min.css">
	<style>
		h3 span {
			font-size: 15px;
		}

		.line-limit-length {
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}

		.mui-bar {
			position: fixed;
			z-index: 10;
			right: 0;
			left: 0;
			height: 44px;
			padding-right: 10px;
			padding-left: 10px;
			border-bottom: 0;
			background-color: #f7f7f7;
			-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .85);
			box-shadow: 0 0 1px rgba(0, 0, 0, .85);
			-webkit-backface-visibility: hidden;
			backface-visibility: hidden
		}

		.mui-bar-nav {
			top: 0;
			-webkit-box-shadow: 0 1px 6px #ccc;
			box-shadow: 0 1px 6px #ccc
		}

		.mui-bar1 {
			position: fixed;
			z-index: 10;
			right: 0;
			left: 0;
			height: 44px;
			padding-right: 10px;
			padding-left: 10px;
			border-bottom: 0;
			background-color: #f7f7f7;
			-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .85);
			box-shadow: 0 0 1px rgba(0, 0, 0, .85);
			-webkit-backface-visibility: hidden;
			backface-visibility: hidden
		}

		.mui-bar-nav1 {
			top: 44px;
			-webkit-box-shadow: 0 1px 6px #ccc;
			box-shadow: 0 1px 6px #ccc
		}

		html,
		body {
			position: relative;
			height: 100%;
		}

		body {
			background: #eee;
			font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
			font-size: 14px;
			color: #000;
			margin: 0;
			padding: 0;
		}

		.swiper-container {
			width: 100%;
			height: auto;
		}

		.swiper-container {
			position: absolute !important;
			z-index: 1000;
			top: 0;
			left: 0;
		}

		.swiper-slide {
			text-align: center;
			font-size: 18px;
			background: #fff;

			/* Center slide text vertically */
			display: -webkit-box;
			display: -ms-flexbox;
			display: -webkit-flex;
			display: flex;
			-webkit-box-pack: center;
			-ms-flex-pack: center;
			-webkit-justify-content: center;
			justify-content: center;
			-webkit-box-align: center;
			-ms-flex-align: center;
			-webkit-align-items: center;
			align-items: center;
		}

		.swiper-container .swiper-wrapper .swiper-slide img {
			display: block;
			< !--position: fixed;
			-->backgrpund-position: center center;
			background-size: cover;
			width: 100%;
			top: 0;
			left: 0;
		}

		#mask {
			background: #000;
			opacity: 0.75;
			filter: alpha(opacity=75);
			height: 100%;
			width: 100%;
			position: fixed;
			left: 0;
			top: 0;
			z-index: 1000;
		}

		.close {
			position: absolute;
			top: 0;
			right: 10px;
			color: #black;
			font-weight: bold;
			font-size: 50px;
			z-index: 10000;
		}
	</style>
</head>
<!--<script type="text/javascript">
		$(document).ready(function() {
			//预约
			$(".orderbut").click(function(){
				var mythis = $(this);
				var textname = $(this).text();
				$.get("/index.php?m=ajax&ajax=1&order=1",{
					pid : 78,
					uid : 184
				}, function (data,textStatus){
					if(data==1){
						if(textname=="预约看车"){
							mythis.text("预约成功");
						}
						else{
							layer.open({
								btn: ['确定'],
								content:'您已经预约过了！'
							});
						}
					}
					else if(data==2){
						layer.open({
							btn: ['确定'],
							content:'清登录后再预约！'
						});
					}
					else{
						layer.open({
							btn: ['确定'],
							content:'预约失败!'
						});
					}
				});
			});
			//添加收藏
			$(".collectbut").click(function(){
				var mythis = $(this);
				var textname = $(this).text();
				$.get("/index.php?m=ajax&ajax=1&collect=1",{
					pid : 78
				}, function (data,textStatus){
					if(data==1){
						if(textname=="收藏"){
							mythis.text("取消收藏");
						}
						else{
							mythis.text("收藏");
						}
					}
					else if(data==2){
						layer.open({
							btn: ['确定'],
							content:'清登录后再收藏!'
						});
					}
					else{
						layer.open({
							btn: ['确定'],
							content:'收藏失败!'
						});
					}
				});
			});
			
			//计算贷款
			$(".clickloan").click(function(){
				layer.open({
					type: 1,
					skin: 'layui-layer-rim', //加上边框
					area: ['620px', '340px'], //宽高
					content: $('#loan')
				});
			});
			$("#loanbut").click(function() {
				var down_payment=$("#down_payment").val();
				var amount=$("input[name='amount']").val();
				var financing_maturity=$("#financing_maturity").val();
				if(down_payment  && amount && financing_maturity)
				{
					if(financing_maturity==12){ var maturity=0.0388}
					if(financing_maturity==24){ var maturity=0.0777}
					if(financing_maturity==36){ var maturity=0.01147689}
					var money= (((amount*(1-down_payment))*(1+maturity)) / financing_maturity);
					var finalmoney=Math.round(money);
					$('.loan-result').show();
					$('#payment').text(finalmoney+"元");
				} 
			});

			$(".clickitem").click(function(){
				var idname = $(this).attr("data");
				var title = $(this).attr("title");
				$("#report").show();
				$("#reportinfo").html($('#'+idname).html());
				$("#title").text(title);
				$("#mainbox").hide();
			});

			$(document).on("click","#reback",function(){
				$("#mainbox").show();
				$("#report").hide();
			});
			var imgUrl = "img/carimg.jpg";  //注意必须是绝对路径

			var lineLink = "#";   //同样，必须是绝对路径
			var descContent = '马自达3星骋 2012款 马自达3 星骋 两厢 2.0L 自动 豪华运动型'; //分享给朋友或朋友圈时的文字简介
			var shareTitle = '这辆星骋是我从别人手里买来的，因为打算换车，所以想把这辆车转让出去。个人觉得性价比不错，空间足够日常家用，平时上下班和外出很适合代步。目前跑了6万多公里，按时做的保养，外观上有轻微剐蹭，但不影响日常行驶。如果有朋友喜欢这辆车，就跟我联系吧。';  //分享title
			var appid = ''; //apiID，可留空

			function shareFriend() {
			WeixinJSBridge.invoke('sendAppMessage',{
			   "appid": appid,
			   "img_url": imgUrl,
			   "img_width": "200",
			   "img_height": "200",
			   "link": lineLink,
			   "desc": descContent,
			   "title": shareTitle
			}, function(res) {
			   //_report('send_msg', res.err_msg);
			})
			}
			function shareTimeline() {
			WeixinJSBridge.invoke('shareTimeline',{
			   "img_url": imgUrl,
			   "img_width": "200",
			   "img_height": "200",
			   "link": lineLink,
			   "desc": descContent,
			   "title": shareTitle
			}, function(res) {
				  //_report('timeline', res.err_msg);
			});
			}
			function shareWeibo() {
			WeixinJSBridge.invoke('shareWeibo',{
			   "content": descContent,
			   "url": lineLink,
			}, function(res) {
			   //_report('weibo', res.err_msg);
			});
			}
			// 当微信内置浏览器完成内部初始化后会触发WeixinJSBridgeReady事件。
			document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
			// 发送给好友
			WeixinJSBridge.on('menu:share:appmessage', function(argv){
			   shareFriend();
			});
			// 分享到朋友圈
			WeixinJSBridge.on('menu:share:timeline', function(argv){
			   shareTimeline();
			});
			// 分享到微博
			WeixinJSBridge.on('menu:share:weibo', function(argv){
			   shareWeibo();
			});
			}, false);
		});
	</script>-->

<body>
	<div id="mainbox">
		<header class="mui-bar mui-bar-nav mo-header" style="background-color: #00002E">
			<div class="mo-header-left">
				<a href="#">
					<font color="#F8F8F8"> 车辆详情 </font>
				</a>
			</div>

			<a id="shareActivity" class="mo-header-right">分享</a>


		</header>
		<!--图片展示-->
		<div id="slideBox" class="slideBox">
			<div class="bd" id="photos">
				<ul id="myul">
					<li id="li1">
						<img id="photo1" src="img/noimgdata.jpg" style="height:230px" />
					</li>
				</ul>
			</div>
			<div class="hd">
				<ul>
				</ul>
			</div>
		</div>
		<div id="mask" style="display:none;"></div>
		<div class="swiper-container" style="display:none;">
			<div class="swiper-wrapper">
				<!-- 如果需要分页器 -->
			</div>
			<div class="swiper-pagination"></div>
		</div>
		<div class="close" style="display:none;">X</div>
		<!-- 图片展示 -->
		<div class="car-detail-box">
			<h3 class="car-allname" id="title"></h3>
			<p class="nowprice" id="price"></p>
			<div>
				<span>vip底价：</span>
				<span class="nowprice" id="vipfloorprice" hidden="hidden"></span>
				<span onclick="vip()" style="float:right;background:red;color:black;">查看vip底价</span>
			</div>
			<p class="newprice" id="clicksum">用户点击累计：</p>
		</div>
		<div class="item-box clearfix">
			<div class="itemlist rightline">
				<p class="text-muted">上牌时间</p>
				<p id="registrationdate"></p>
			</div>
			<div class="itemlist rightline">
				<p class="text-muted">表显里程(万公里)</p>
				<p id="mileage"></p>
			</div>
			<div class="itemlist rightline">
				<p class="text-muted">排量</p>
				<p id="pailiang"></p>
			</div>
			<div class="itemlist">
				<p class="text-muted">变速箱</p>
				<p id="transmission"></p>
			</div>
		</div>
		<div class="car-box">
			<h3><a href="#"><span class="more"><i class="iconfont">&#xe61d;</i></span><span class="title">基本信息</span></a></h3>
			<div class="box">
				<ul class="carinfobox clearfix">
					<li> <span class="gray">归属地：</span><label id="city">无</label> </li>
					<li> <span class="gray">车型：</span><label id="cartype">无</label> </li>
					<li> <span class="gray">颜色：</span><label id="color">无</label> </li>
					<li> <span class="gray">燃油类型：</span><label id="fueltype">无</label> </li>
					<li> <span class="gray">排放标准：</span><label id="emissionstandard">无</label> </li>
					<li> <span class="gray">年检到期：</span><label id="yearinsurance">无</label></li>
					<li> <span class="gray">商业险到期：</span><label id="commercialinsurance">无</label></li>
					<li> <span class="gray">交强险到期：</span><label id="compulsoryinsurance">无</label></li>
				</ul>
			</div>
		</div>
		<div class="car-box">
			<h3><span class="title">车况描述</span></h3>
			<div class="box" id="description"> </div>
		</div>
		<div class="car-box">
			<h3><span class="title">车主信息</span></h3>
			<div class="box">
				<p id="nickname">昵称：</p>
				<!--<p>看车地点：北京海淀西三旗新龙大厦B座810</p>-->
				<p id="telephone">联系电话：</p>
				<!--<a href="/index.php?m=shop&id=184" class="user-menu">进入商家店铺</a>-->
			</div>
		</div>
		<h3><span>猜你喜欢同款</span></h3>
		<div class="car-box" id="listcars">
		</div>

		<!--<div class="listcar" id="listcars">
					<a href="/cars/39" target="_blank">
						<div class="carimg"> <img data-original="img/carimg.jpg" width="300" height="230" class="img-responsive lazy" /> </div>
						<div class="carinfo">
							<h4>马自达 睿翼2009款 睿翼 2.5L 至尊版</h4>
							<p class="caritem">2009-11 上牌 / 6.27万公里</p>
							<p class="carprice">￥10.30万</p>
						</div>
					</a>
				</div>-->

		<div class="clicktel-box"></div>
		<ul class="bottom-tools clearfix">
			<li style="width:33%">
				<a href="sendmsg.html" class="collectbut">在线沟通</a>
			</li>
			<li style="width:33%">
				<a href="javascript:;" class="collectbut" onclick="collect()">收藏</a>
			</li>
			<li style="width:33%">
				<a id="makephone" href="">拨打电话</a>
			</li>
		</ul>
		<!--<a href="javascript:;" id="returntop"></a>-->

		<script type="text/javascript" charset="utf-8">
			$(function () {
				$("img.lazy").lazyload({
					effect: "fadeIn"
				});
				/*$('#returntop').click(function() {
					$('html,body').animate({
						scrollTop: '0px'
					}, 1000);
					return false;
				});*/
			});
		</script>
		<script>
			function collect() {
				var vehicleid = window.localStorage.getItem("carid");
				var telephone = window.localStorage.getItem("telephone");
				//alert(telephone);
				$.ajax({
					type: "post",
					data: {
						"telephone": telephone,
						"vehicleid": vehicleid,
						"vehicletype": 0
					},
					url: servicePath + "sechandcar/app/sys/vehicleCollect",
					datatype: 'json',
					success: function (data) {
						if (data == "insert") {
							window.alert("收藏成功");
						} else if (data == "have") {
							window.alert("已收藏");
						}
					},
					error: function (data) {
						alert('收藏失败');
					}
				});
			}

			function vip() {
				var isVip = window.localStorage.getItem("type");
				//alert(isVip);
				if (isVip == '1') {
					$('#vipfloorprice').show();
				} else {
					window.location.href = "vip.html";
				}
			}
		</script>
	</div>
	<div id="report" style="display:none;">
		<header class='mo-header'>
			<div class='mo-header-left'>
				<a href='javascript:;' id='reback'><i class='iconfont'>&#xe647;</i></a>
			</div>
			<div class='mo-header-title' id="title">选择城市</div>
		</header>
		<div id="reportinfo"></div>
	</div>
	<script src="js/swiper.min.js"></script>
</body>
<script type="text/javascript">
	var carportid;
	var adduserid;
	var nickname;
	var portid;
	var idd = GetRequest().id;
	var brandmodel;
	var price;
	var year;
	var mileage;
	var imageUrl;
	var mySwiper;
	(function ($, doc) {
		console.log("join...");
		$.init();
		var id = "";

		//$('#vipfloorprice').hide();
		$.plusReady(function () {
			//var self = plus.webview.currentWebview();
			//获取前面页中的extras中的参数
			//carportid = self.ids;
			var d = {
				'id': GetRequest().id
			};
			var url = servicePath + "sechandcar/app/sys/selectCarById";
			mui.ajax(url, {
				data: {
					id: GetRequest().id
				}, //把json转换为字符串
				dataType: 'json', //返回数据格式
				type: 'get', //请求方式
				async: false,
				success: function (data) {
					if (data.clicksum != null && data.clicksum != '') {
						jQuery("#clicksum").empty();
						jQuery("#clicksum").html('用户点击累计:' + data.clicksum);

						var u = servicePath + "sechandcar/app/sys/addclickcar";
						mui.ajax(u, {
							data: {
								id: data.id
							}, //把json转换为字符串
							dataType: 'json', //返回数据格式
							type: 'post', //请求方式
							async: false,

							success: back11
						});
					}
					//2019年2月22日 15:03:27   zhangzf
					window.localStorage.setItem("nickname1", data.nickname);
					window.localStorage.setItem("adduserid1", data.adduserid);
					window.localStorage.setItem("portid1", data.id);
					window.localStorage.setItem("porttype1", '1');
					window.localStorage.setItem("porttitle1", data.brandmodel);

					window.localStorage.setItem("carid", data.id);
					//alert(data.id);
					window.localStorage.setItem("cartelephone", data.telephone);
					// alert(data.id);
					//alert(data.telephone);
					jQuery('#vipfloorprice').empty();
					jQuery('#vipfloorprice').append(data.vipfloorprice + "万元");
					var s = '';
					var ht = '';
					if (data.photo1 != null && data.photo1 != '') {
						var imgurl = servicePath + data.photo1;
						imageUrl = imgurl;
						jQuery('#photo1').attr('src', imgurl);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo2 != null && data.photo2 != '') {
						var imgurl = servicePath + data.photo2;
						s = '<li><img src="' + imgurl + '" style="height:230px"/></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo3 != null && data.photo3 != '') {
						var imgurl = servicePath + data.photo3;
						s = '<li><img src="' + imgurl + '" style="height:230px"/></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo4 != null && data.photo4 != '') {
						var imgurl = servicePath + data.photo4;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo5 != null && data.photo5 != '') {
						var imgurl = servicePath + data.photo5;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo6 != null && data.photo6 != '') {
						var imgurl = servicePath + data.photo6;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo7 != null && data.photo7 != '') {
						var imgurl = servicePath + data.photo7;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo8 != null && data.photo8 != '') {
						var imgurl = servicePath + data.photo8;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo9 != null && data.photo9 != '') {
						var imgurl = servicePath + data.photo9;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo10 != null && data.photo10 != '') {
						var imgurl = servicePath + data.photo10;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo11 != null && data.photo11 != '') {
						var imgurl = servicePath + data.photo11;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo12 != null && data.photo12 != '') {
						var imgurl = servicePath + data.photo12;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo13 != null && data.photo13 != '') {
						var imgurl = servicePath + data.photo13;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo14 != null && data.photo14 != '') {
						var imgurl = servicePath + data.photo14;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}

					if (data.photo15 != null && data.photo15 != '') {
						var imgurl = servicePath + data.photo15;
						s = '<li><a class="pic" href="#"><img src="' + imgurl + '" style="height:230px"/></a></li>';
						jQuery('#myul').append(s);
						ht += '<div class="swiper-slide"><img src="' + imgurl + '"/></div>';
					}
					jQuery(".swiper-container .swiper-wrapper").append(ht);
					mySwiper = new Swiper('.swiper-container', {
						touchRatio: 2,
						pagination: '.swiper-pagination',
						// 如果需要分页器
						observer: true, //修改swiper自己或子元素时，自动初始化swiper
						observeParents: true //修改swiper的父元素时，自动初始化swiper
					})
					TouchSlide({
						slideCell: "#slideBox",
						titCell: ".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
						mainCell: ".bd ul",
						effect: "leftLoop",
						autoPage: true, //自动分页
						autoPlay: true //自动播放
					});


					jQuery('#title').empty();
					jQuery('#title').append(data.brandmodel);
					brandmodel = data.brandmodel;
					jQuery('#price').empty();
					jQuery('#price').append(data.wholesaleprice + '万元');
					price = data.wholesaleprice;


					jQuery('#registrationdate').empty();
					jQuery('#registrationdate').append(data.registrationdate);
					year = data.registrationdate;

					jQuery('#mileage').empty();
					jQuery('#mileage').append(data.mileage);
					mileage = data.mileage;

					jQuery('#transmission').empty();
					jQuery('#transmission').append(data.transmission);

					if (data.city != null && data.city != '') {
						jQuery('#city').empty();
						jQuery('#city').append(data.city);
					}

					if (data.cartype != null && data.cartype != '') {
						jQuery('#cartype').empty();
						jQuery('#cartype').append(data.cartype);
					}

					if (data.color != null && data.color != '') {
						jQuery('#color').empty();
						jQuery('#color').append(data.color);
					}

					if (data.transmission != null && data.transmission != '') {
						jQuery('#transmission').empty();
						jQuery('#transmission').append(data.transmission);
					}

					if (data.mileage != null && data.mileage != '') {
						jQuery('#mileage').empty();
						jQuery('#mileage').append(data.mileage);
					}

					if (data.registrationdate != null && data.registrationdate != '') {
						jQuery('#registrationdate').empty();
						jQuery('#registrationdate').append(data.registrationdate);
					}

					if (data.fueltype != null && data.fueltype != '') {
						jQuery('#fueltype').empty();
						jQuery('#fueltype').append(data.fueltype);
					}

					if (data.emissionstandard != null && data.emissionstandard != '') {
						jQuery('#emissionstandard').empty();
						jQuery('#emissionstandard').append(data.emissionstandard);
					}

					if (data.yearinsurance != null && data.yearinsurance != '') {
						jQuery('#yearinsurance').empty();
						jQuery('#yearinsurance').append(data.yearinsurance);
					}

					if (data.commercialinsurance != null && data.commercialinsurance != '') {
						jQuery('#commercialinsurance').empty();
						jQuery('#commercialinsurance').append(data.commercialinsurance);
					}

					if (data.compulsoryinsurance != null && data.compulsoryinsurance != '') {
						jQuery('#compulsoryinsurance').empty();
						jQuery('#compulsoryinsurance').append(data.compulsoryinsurance);
					}

					if (data.description != null && data.description != '') {
						jQuery('#description').empty();
						jQuery('#description').append(data.description);
					}

					//=====================车主信息====================================
					if (data.nickname != null && data.nickname != '') {
						jQuery('#nickname').empty();
						jQuery('#nickname').append('昵称：' + data.nickname);
					}

					if (data.telephone != null && data.telephone != '') {
						jQuery('#telephone').empty();
						jQuery('#telephone').append('车主电话：' + data.telephone);
					}

					if (data.outputvolume != null && data.outputvolume != '') {
						jQuery('#pailiang').empty();
						jQuery('#pailiang').append(data.outputvolume);
					}


					jQuery('#makephone').attr('href', 'tel:' + data.telephone); //拨打电话

					/*var url1 = servicePath+'sechandcar/app/sys/getBybrandmodel';
					mui.ajax(url1, {
						//			        data:{productId:iid},  //把json转换为字符串
						data: {
							brandmodel: ''
						},
						dataType: 'json', //返回数据格式
						type: 'get', //请求方式
						async: false,
						contentType: "application/json", //处理中文乱码
						success: back1
					});*/
					var url1 = servicePath + "sechandcar/app/sys/recommendCar";
					mui.ajax(url1, {
						data: {
							"brandmodel": data.brandmodel,
							"id": data.id
						}, //把json转换为字符串
						dataType: 'json', //返回数据格式
						type: 'post', //请求方式
						async: false,
						success: function (data) {
							//alert(data);
							recommendCar(data);
						}
					});
				}
			});

			var close = document.getElementsByClassName("close")[0];
			close.onclick = function () {
				/*alert("jinlaile");
						var container = document.getElementsByClassName("swiper-container")[0];
						var mainbox = document.getElementById("mainbox");
		                mainbox.removeChild(container);*/
				jQuery(".swiper-container").css("display", "none");
				jQuery(".close").css("display", "none");
				jQuery("#mask").css("display", "none");
			}

			function recommendCar(data) {
				var inf = '';
				for (var i = 0; i < data.length; i++) {
					//window.alert(data[i].id);
					var dz = "cardetail.html?id=" + data[i].id;
					var s = '<a   href="' + dz + '"><div class="listcar">' +
						'<div class="carimg"><img src="' + servicePath + '' + data[i].photo1 +
						'" data-original="img/carimg.jpg" class="img-responsive lazy" /> </div>' +
						'<div class="carinfo">' +
						'<h4>' + data[i].brandmodel + '</h4>' +
						'<p class="caritem">' + data[i].registrationdate + ' 上牌/ ' + data[i].mileage + '万公里</p>' +
						'<span class="carprice">￥' + data[i].wholesaleprice + '万元</span>' +
						'</div>' +
						'</div></a>';
					inf += s;

					//$("#listcars").append(s);
					//$('#listcar').append(s);

					//alert($("#listcars"));    
					//alert($('#listcar'))
					//window.alert($("input[name='id']").val());
				}

				//alert(inf)	 
				//document.getElementById("listcars").innerHTML=inf
				jQuery("#listcars").html(inf);

			}

			var shares = {};

			//					var content = doc.getElementById("activityDetail");
			plus.share.getServices(function (s) {
				if (s && s.length > 0) {
					for (var i = 0; i < s.length; i++) {
						var t = s[i];
						shares[t.id] = t;
					}
				}
			}, function () {
				console.log("获取分享服务列表失败");
			});

			document.getElementById("shareActivity").addEventListener('tap', function () {
				var ids = [{
						id: "weixin",
						ex: "WXSceneSession"
					}, {
						id: "weixin",
						ex: "WXSceneTimeline"
					}, {
						id: "qq"
					}],
					bts = [{
						title: "发送给微信好友"
					}, {
						title: "分享到微信朋友圈"
					}, {
						title: "分享到QQ"
					}];
				plus.nativeUI.actionSheet({
					cancel: "取消",
					buttons: bts
				}, function (e) {
					var i = e.index;
					if (i > 0) {
						var s_id = ids[i - 1].id;
						var share = shares[s_id];
						if (share.authenticated) {
							shareMessage(share, ids[i - 1].ex);
						} else {
							share.authorize(function () {
								shareMessage(share, ids[i - 1].ex);
							}, function (e) {
								console.log("认证授权失败：" + e.code + " - " + e.message);
								plus.nativeUI.toast(e.message);
							});
						}
					}
				});
			});
		});

	}(mui, document));

	$(document).on('click', '#slideBox .bd #myul li', function () {
		console.log(mySwiper);
		var index = $(this).index() - 1;
		mySwiper.slideTo(index, 1, false);
		$(".swiper-container").show();
		$(".close").show();
		$("#mask").show();
	})

	function GetRequest() {
		var url = location.search; //获取url中"?"符后的字串
		var theRequest = new Object();
		if (url.indexOf("?") != -1) {
			var str = url.substr(1);
			strs = str.split("&");
			for (var i = 0; i < strs.length; i++) {
				theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
			}
		}
		return theRequest;
	}


	function shareMessage(share, ex) {


		var msg = {
			extra: {
				scene: ex
			}
		};
		var surl = servicePath + "ershouche/cardetail.html?id=" + idd;
		console.log(surl);
		//var content=document.getElementById("activity_desc");
		msg.href = surl;
		msg.title = brandmodel;
		msg.content = "[价格]￥" + price + "万" + "\n" + "[年限]" + year + "\n" + "[里程]" + mileage + "万公里";

		msg.thumbs = [imageUrl];
		share.send(msg, function () {
			//$.toast("分享到\"" + share.description + "\"成功！ ");
			console.log("分享到\"" + share.description + "\"成功！ ");
		}, function (e) {
			//$.toast("分享到\"" + share.description + "\"失败: " + e.code);
			console.log("分享到\"" + share.description + "\"失败: " + e.code + " - " + e.message);
		});
	}



	function back1(data1) {
		for (var i = 0; i < data.length; i++) {
			var s = '<div class="listcar">';
			s += '<a href="#" onclick="showdetail(' + data[i].id + ')">' +
				'<div class="carimg"><img src="http://122.14.200.206:8080' + data[i].photo1 +
				'" data-original="img/carimg.jpg" class="img-responsive lazy" /> </div>' +
				'<div class="carinfo">' +
				'<h4>' + data[i].cartype + '</h4>' +
				'<p class="caritem">' + data[i].registrationdate + ' 上牌/ ' + data[i].mileage + '公里</p>' +
				'<p class="carprice">￥' + data[i].wholesaleprice + '</p>' +
				'</div>' +
				'</a>' +
				'</div>';
			$('#listcars').append(s);
		}
	}


	function back11(data) {

	}

	function showdetail(id) {
		mui.openWindow({
			id: 'likecardetail',
			url: 'likecardetail.html',
			createNew: true,
			waiting: {
				autoShow: true,
				title: '正在加载...',
			},
			extras: {
				ids: id
			}
		});
	}
</script>



</html>